package com.zhentao.job;

import com.xxl.job.core.handler.annotation.XxlJob;
import com.zhentao.service.HotArticleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class HelloJob {
    @Autowired
    HotArticleService hotArticleService;

    @XxlJob("computeHotArticleJob")
    public void helloJob() {
        System.out.println("事物调度开启。。。。");
        hotArticleService.computeHotArticle();
        System.out.println("事物调度关闭。。。。");
    }
}
